package com.guigu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.guigu.mapper.ShopImagesMapper;
import com.guigu.pojo.ShopImags;
import com.guigu.service.ShopImagsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ShopImagsServiceImpl extends ServiceImpl<ShopImagesMapper, ShopImags>
implements ShopImagsService {

    @Autowired
    ShopImagesMapper shopImagesMapper;


    //根据商品id查询图像地址
    @Override
    public List<ShopImags> queryImagsByShopId(Integer id) {
        QueryWrapper<ShopImags> queryWrapper=new  QueryWrapper<ShopImags>();
        queryWrapper.eq("shop_id",id);
        return shopImagesMapper.selectList(queryWrapper);
    }
}
